// 注册一个全局自定义指令 `v-focus`

import type { Directive, DirectiveBinding } from "vue";

const focus: Directive = {
  mounted(el: HTMLElement, binding: DirectiveBinding) {
    // 聚焦元素
    el.focus();
  }
};

export default focus;
